package com.ys.zero.web;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ys.zero.bean.Result;
import com.ys.zero.bean.User;
import com.ys.zero.biz.BizException;

/**
 * 获得会话对象
 * @author Administrator
 *
 */
@WebServlet("/get/*")
public class GetLoginedUser extends BaseServlet {
	private static final long serialVersionUID = 1L;
       
	protected void loginedUser(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		User user = (User) request.getSession().getAttribute("loginedUser");
		System.out.println(user);
		toJson(response, user);
	}
	
}
